#pragma once

#include "../HighLevel/Handles.h"
public __gc class CSharpInterface
///////////////////////////////////////////////////////////////////////////////
// Description: Managed C++ interface for the C# tool to use
//
// Recent Changes:
// -brasmuss 4/8/2007 : Created
///////////////////////////////////////////////////////////////////////////////
{
public:
	void Create(void* hwnd);
	void Release();
	void Update(float delta);

/////////////////////////////////////////////
// METHODS THAT MAP DIRECTLY TO TOOL SYSTEM
/////////////////////////////////////////////
	bool			LoadSoundXML(		const char* file, bool updateCoreSystem);	//!< Set the sound XML file name that was created by the tool
	bool			SaveSoundXML(		const char* file );									//!< Save all the SoundSystem information to XML format
	void			UpdateCoreSystem();

	// Category managment
	CategoryHandle	NewCategory(		const char* categoryName );
	unsigned		GetCategoryCount();
	const char*		GetCategoryName(	unsigned index );
	bool			SetCategoryName(	unsigned index, const char* name );
	bool			RemoveCategory(		unsigned index );


	// Sound file managment
	bool 			NewSoundFile(		const CategoryHandle& catID, const char* name, const char* file );
	unsigned		GetSoundFileCount(	const CategoryHandle& categoryID );
	const char*		GetSoundFilename(	const CategoryHandle& categoryID, unsigned index );
	const char*		GetSoundName(		const CategoryHandle& categoryID, unsigned index );
	bool			SetSoundFilename(	const CategoryHandle& categoryID, unsigned index, const char* filename );
	bool			SetSoundName(		const CategoryHandle& categoryID, unsigned index, const char* name );
	bool			RemoveSound(		const CategoryHandle& categoryID, unsigned index );

	// Sound path managment
	bool 			SetSoundPath(		const CategoryHandle& catID, const char* path );
	const char*		GetSoundPath(		const CategoryHandle& categoryID );

	// Variable managment
	bool			NewVariable(		const char* varName, float min, float max );
	unsigned		GetVariableCount();
	const char*		GetVariableName(	unsigned index );
	float			GetVariableMin(		unsigned index );
	float			GetVariableMax(		unsigned index );
	bool			SetVariableName(	unsigned index, const char* name );
	bool			SetVariableMin(		unsigned index, float min );
	bool			SetVariableMax(		unsigned index, float max );
	bool			RemoveVariable(		unsigned index );

	// Graph management
	GraphHandle		NewGraph(			const char* graphName );
	bool			ClearGraph(			const GraphHandle& graphID );
	bool			RemoveGraph(		const GraphHandle& graphID );
	const char*		GetGraphName(		const GraphHandle& graphID );
	bool			SetGraphName(		const GraphHandle& graphID, const char* name );
	bool			AddPoint(			const GraphHandle& graphID, float x, float y);

	// Events, SubEvents & Effects
	EventHandle		NewEvent(			const char* name );
	bool			RemoveEvent(		const EventHandle& eventID );
	SubEventHandle	AddSubEvent(		const EventHandle& eventID, const char* soundName, float triggerTime );
	bool			RemoveSubEvent(		const EventHandle& eventID, const SubEventHandle& subID );
	EffectHandle	AddSoundEffect(		const EventHandle& eventID, const SubEventHandle& subID, const char* graphName, const char* varName, unsigned effect );
	EffectHandle	AddSoundEffect(		const EventHandle& eventID, const SubEventHandle& subID, GraphHandle graphID, VariableHandle varID, unsigned effect );
	bool			RemoveSoundEffect(	const EventHandle& eventID, const SubEventHandle& subID, const EffectHandle& fxID );

private:
	//class SoundSystem*	m_system;
};